import {setServer} from "@/utils/axios";
import {fireUrl} from "../../../url";
const request = setServer(fireUrl);

// 查询消防栓
export function getHydrant(query) {
  return request({
    url: '/hydrant/',
    method: 'get',
    params: query
  })
}

// 查询消防栓详情
export function getHydrantDetail(id) {
  return request({
    url: '/hydrant/'+id,
    method: 'get',
  })
}

// 查询小区消防栓
export function getHydrantByBiotopeId(query) {
  return request({
    url: '/hydrant/listByBiotopeId',
    method: 'get',
    params: query
  })
}


// 修改消防栓
export function updateHydrant(query) {
  return request({
    url: '/hydrant/',
    method: 'put',
    data: query
  })
}

// 新增消防栓
export function addHydrant(query) {
  return request({
    url: '/hydrant/',
    method: 'post',
    data: query
  })
}

// 删除消防栓
export function deleteHydrant(id) {
  return request({
    url: '/hydrant/'+id,
    method: 'delete',
  })
}
// 绑定消防栓
export function bindHydrantDevice(query) {
  return request({
    url: '/hydrant/bindDevice',
    method: 'put',
    data: query
  })
}
